#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.8.1
 Author:         John Collins, but basically unchanged from original authors
	Credits to: AutoIt Forums
					Alexischang	(isNetAlive)
					rajeshontheweb (_GetLocalIPAddressList)

 Script Function:  Useful for determining if any active connections exist, and if

#ce ----------------------------------------------------------------------------

#include <array.au3>

Func isNetAlive($dllHandle)
	Local $isConnected = DLLCall($dllHandle,"int","IsNetworkAlive", "int*", 0)
	Return $isConnected[0]
EndFunc


Func _GetLocalIPAddress_WMI()
    Local $retArray[1]
    Local $objWMIService = ObjGet("winmgmts:\\.\root\CIMV2")
    Local $IPConfigSet = $objWMIService.ExecQuery("Select IPAddress from Win32_NetworkAdapterConfiguration ")
	local $array
	For $IPConfig In $IPConfigSet
        $array = $IPConfig.IPAddress
        If IsArray($array) Then
            For $i = 0 To UBound($array) - 1
                _ArrayAdd($retArray, $array[$i])
            Next
        EndIf
    Next

    Return $retArray
EndFunc   ;==>_GetLocalIPAddress_WMI